package cn.onecloud.tablet.xiaozhi.util;

import java.util.Date;
import java.util.TimeZone;
import java.util.UUID;

/**
 * Created by yin.he on 12/1/17.
 */

public class TimeUtil {

    public static String getUUID8() {
        String uuid = UUID.randomUUID().toString();
        uuid = uuid.replace("-", "");
        return uuid.substring(0, 8);
    }

    public static long getSHTime() {
        TimeZone tz = TimeZone.getTimeZone("Asia/Shanghai");
        TimeZone.setDefault(tz);
        Date date = new Date();
        return date.getTime();
    }
}
